<?php
/**
 *
 * @author CuongIt
 * @version 
 */
/**
 * Career Form
 *
 * @uses ZendForm Zend_Form
 */
class Admin_Form_Tour extends Zend_Form 
{
    
	public function init() 
	{
	    // Config
	    $this->setName('tourform')->setAction('/detailtour/process')->setMethod('POST');
		
	    //Validators
	    $length_validate = new Zend_Validate_StringLength(6, 50);
	    /********************************************************************************
	     MORE INFOMATIONS
	    *********************************************************************************/
		    // PRICE
		    $price = new Zend_Form_Element_Text('price');
		    $price->setLabel('Price')
		    ->setAttrib('minlength', '6')
		    ->setAttrib('class', 'field-text large required')
		    ->setDecorators(array(	'ViewHelper', 'Description', 'Errors',	array(array('data' => 'HtmlTag'), array('tag' => 'span')),
		    		array('Label', array('tag' => 'span')),
		    		array(array('row' => 'HtmlTag'), array('tag' => 'p', 'class' => 'clear'))
		    ))
		    ->addValidator($length_validate);
		    
		    // LENGTH DAY
		    $lengthDay = new Zend_Form_Element_Text('lengthDay');
		    $lengthDay->setLabel('Length Day')
		    ->setAttrib('minlength', '6')
		    ->setAttrib('class', 'field-text large required')
		    ->setDecorators(array(	'ViewHelper', 'Description', 'Errors',	array(array('data' => 'HtmlTag'), array('tag' => 'span')),
		    		array('Label', array('tag' => 'span')),
		    		array(array('row' => 'HtmlTag'), array('tag' => 'p', 'class' => 'clear'))
		    ))
		    ->addValidator($length_validate);
		    // LENGTH NIGHT
		    $lengthNight = new Zend_Form_Element_Text('lengthNight');
		    $lengthNight->setLabel('Length Night')
		    ->setAttrib('minlength', '6')
		    ->setAttrib('class', 'field-text large required')
		    ->setDecorators(array(	'ViewHelper', 'Description', 'Errors',	array(array('data' => 'HtmlTag'), array('tag' => 'span')),
		    		array('Label', array('tag' => 'span')),
		    		array(array('row' => 'HtmlTag'), array('tag' => 'p', 'class' => 'clear'))
		    ))
		    ->addValidator($length_validate);

	    /********************************************************************************
	     TITLES
	    *********************************************************************************/
	    
	    	require_once 'Titleform.php';
	   	    	     
	    /********************************************************************************
	     INTROS
	    *********************************************************************************/
	    
	  		require_once 'Introform.php';
	    
	  	/********************************************************************************
	  	 DESCRIPTIONS
	  	*********************************************************************************/
	  	
	  		require_once 'Descriptionform.php';
	  	
	  	/********************************************************************************
	  	 COUNTRY LIST
	  	*********************************************************************************/
	  		require_once 'Countryform.php';
	  	 
	  	/********************************************************************************
	  	 REGION LIST
	  	*********************************************************************************/
	  		require_once 'Regionform.php';
	  	
	  	/********************************************************************************
	  	 CITY LIST
	  	*********************************************************************************/
	  		require_once 'Cityform.php';
	  	
	  	/********************************************************************************
	  	 INCLUSIONS LIST
	  	*********************************************************************************/
	  		require_once 'Inclusionsform.php';
	  	
	  	/********************************************************************************
	  	 EXCLUSIONS LIST
	  	*********************************************************************************/
	  		require_once 'Exclusionsform.php';
	  	
	  	/********************************************************************************
	  	 CANCELLATION LIST
	  	*********************************************************************************/
	  		require_once 'Cancellationform.php';
	  	
	  	/********************************************************************************
	  	 THEME LIST
	  	*********************************************************************************/
	  		require_once 'Themeform.php';
	  	
	  	/********************************************************************************
	  	 SEO
	  	*********************************************************************************/
	  		require_once 'Seoform.php';
	  	
	  	/********************************************************************************
	  	 PUBLIC
	  	*********************************************************************************/
	  	
	  		require_once 'Publicform.php';
	    
		$this->addElements(array(
				$title_vi,
				$title_en,
				$title_ja,
				$title_zh,
				$title_fr,
				$intro_vi, 
				$intro_en,
				$intro_ja,
				$intro_zh,
				$intro_fr,
				$description_vi,
				$description_en,
				$description_ja,
				$description_zh,
				$description_fr,
				$countryId,
				$regionId,
				$cityId,
				$inclusions,
				$exclusions,
				$cancellation,
				$theme,
				$price,
				$lengthDay,
				$lengthNight,
				$alias_vi,
				$alias_en,
				$alias_ja,
				$alias_zh,
				$alias_fr,
				$metatag_vi,
				$metatag_en,
				$metatag_ja,
				$metatag_zh,
				$metatag_fr,
				$keyword_vi,
				$keyword_en,
				$keyword_ja,
				$keyword_zh,
				$keyword_fr,
				$priority,
				$status,
		));
		
		
		$this->setDecorators(array('FormElements', array('HtmlTag', array('tag' => 'section')), 'Form'));
		return $this;
	}
}

